home *** CD-ROM | disk | FTP | other *** search
- global DBPath
-
- on exitFrame me
- db = DGOpenDatabase(DBPath & "FlyBox.mdb", 0, 0, ";PWD=StopLooking")
- theString = getVariable(sprite(1), "Anecdote")
- FlyID = getVariable(sprite(1), "FlyID")
- num = length(theString)
- repeat with i = 1 to num
- if theString.char[i] = "'" then
- NewString = NewString & "''"
- next repeat
- end if
- NewString = NewString & theString.char[i]
- end repeat
- DGExecute("INSERT INTO Anecdote (FlyID, Anecdote) VALUES (" & FlyID & ", '" & theString & "')", db)
- DGClose(db)
- end
-